package com.bmw.seed.config;

import com.bmw.seed.Interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Classname: LoginAdapter
 * Package: com.bmw.seed.config
 * Description:
 *
 * @Author 王少伟
 * @Create 2024/1/30 23:10
 * @Version 1.8
 */
@Configuration
public class LoginAdapter implements WebMvcConfigurer {
    @Autowired
    private LoginInterceptor loginInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(loginInterceptor).addPathPatterns("/**");
    }
}
